<template>
  <div>
    <!-- 这是信息详情页 -->
    <div class="banben">
      <!-- 这是版本信息页面 -->
      <!-- 书写标题头 -->
      <div class="order_title">
        <span class="one" @click="fanhui">&lt;</span>
        <span>消息详情</span>
      </div>
      <!-- 当前版本 -->
      <div class="one_inf">
        <div class="zuo">
          <h3>系统通知</h3>
          <span>发布人：</span>
          <span>{{ messVal.sourceName }}</span>
        </div>
        <div class="you_time">
          <span>{{ messVal.createTime }}</span>
        </div>
      </div>
      <!-- 版本信息 -->
      <div class="two_inf">
        <span>{{ messVal.msgDate }}</span>
      </div>
    </div>
  </div>
</template>

<script>
import { MessageXiangQing, GetMessageisRead } from "@/request/api";
export default {
  data() {
    return {
      messVal: "",
    };
  },
  methods: {
    fanhui() {
      this.$router.go(-1);
    },
  },
  created() {
    // 发送详情页请求
    // console.log(this.$route.query.id);
    MessageXiangQing({
      id: this.$route.query.id,
    }).then((res) => {
      //   console.log(res.data);
      this.messVal = res.data;
    }),
      // 发送是否已读请求
      GetMessageisRead({
        id: this.$route.query.id,
      }).then((res) => {
        console.log(this.$route.query.id);
        console.log(res);
      });
  },
};
</script>
 
<style lang = "less" scoped>
.banben {
  min-height: 100%;
  width: 100%;
  background-color: #efefef;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 6;
  /* 标题头样式 */
  /* 标题头的样式 */
  .order_title {
    width: 100%;
    height: 0.5rem;
    background-color: #003399;
    text-align: center;
    line-height: 0.5rem;
    color: white;
    font-size: 0.18rem;
    padding-top: 0.1rem;
    .one {
      float: left;
      margin-left: 0.2rem;
    }
  }
  .one_inf {
    width: 100%;
    background-color: white;
    padding: 0.2rem;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    line-height: 0.2rem;
    .you_time {
      line-height: 0.4rem;
    }
    span {
      color: #aaa;
    }
  }
  .two_inf {
    padding: 0.2rem;
    background-color: white;
    span {
      color: #888;
    }
  }
}
</style>